<!doctype html>
<html lang="en" xmlns:v-bind="http://www.w3.org/1999/xhtml" xmlns:v-on="http://www.w3.org/1999/xhtml" xmlns:v-model="http://www.w3.org/1999/xhtml">
<head>
    <meta charset="UTF-8">
    <title>Document</title>
</head>
<body>
局部注册，只在当前实例中可用
<div id="app">
    <my-component :msg="msg"></my-component>
</div>

</body>
<script src="../../../vender/vue@2.4.2.js"></script>
<script>
    var myComponent={
        template:'<em>{{msg}}</em>',
        props:['msg']
    };
    //局部注册，只在当前实例中可用
    var app=new Vue({
        el:'#app',
        components:{
            'my-component':myComponent
        },
        data:{
            msg:'Hello.'
        }
    });


</script>
</html>